Skip to content

Conversation

@starsdong
Copy link
Contributor

Briefly, what does this PR introduce?

What kind of change does this PR introduce?

  • Bug fix (issue #__)
  • New feature (issue #__)
  • Documentation update
  • Other: __

Please check if this PR fulfills the following:

  • Tests for the changes have been added
  • Documentation has been added / updated
  • Changes have been communicated to collaborators

Does this PR introduce breaking changes? What changes might users need to make to their code?

None

Does this PR change default behavior?

New SecondaryVerticesHelix factory added into reco plugin, SecondaryVerticesHelix object (currently with edm4eic:Vertex structure) saved in PODIO

@starsdong
Copy link
Contributor Author

Hi Wouter and Dmitri,

Based on the comments received this morning at the Reconstruction WG meeting, I updated the branch with the general calculation for any two-track combinations. I tested with the pi-pi selection in the down-stream analysis and it yields identical results compared to my early implementation.

This PR applies the include-what-you-use fixes as suggested by
https://github.com/eic/EICrecon/actions/runs/18668462362.
Please merge this PR into the branch `pr/secondaryvertex-helix`
to resolve failures in PR #2144.

Auto-generated by [create-pull-request][1]

[1]: https://github.com/peter-evans/create-pull-request

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@starsdong starsdong requested review from veprbl and wdconinc October 21, 2025 18:36
@starsdong
Copy link
Contributor Author

Hi Wouter and Dmitri,

The two remaining failed checks seem to beyond my knowledge. Will you be able to help identify what went wrong there? Thanks and Regards

/xin

@veprbl
Copy link
Member

veprbl commented Oct 23, 2025

Hi Wouter and Dmitri,

The two remaining failed checks seem to beyond my knowledge. Will you be able to help identify what went wrong there? Thanks and Regards

/xin

This looks like an irrelevant issue. Should resolve itself once latest geometry makes it into the container. I'm rerunning container build without cache now, so, hopefully, this will clear away. We can review the code meanwhile.

@starsdong
Copy link
Contributor Author

Hi Wouter and Dmitri,
The two remaining failed checks seem to beyond my knowledge. Will you be able to help identify what went wrong there? Thanks and Regards
/xin

This looks like an irrelevant issue. Should resolve itself once latest geometry makes it into the container. I'm rerunning container build without cache now, so, hopefully, this will clear away. We can review the code meanwhile.

Hi Dmitri and Wouter,

Do you have any suggestions/comments to this PR? Any adjustment is needed before it gets merged? Thanks

/xin

@veprbl
Copy link
Member

veprbl commented Nov 6, 2025

This is on my radar, but I haven't had chance to look deeper yet. I can share a few early comments. We don't have a convention for utility libraries in EICrecon. For now, do you think we could merge Helix.cc and Helix.h into SecondaryVerticesHelix.cc? I also see you provide Config structure, but don't expose the parameters in the factory. And last is the hardcoded b_field, would it make sense to get the value from the geometry service instead (e.g. sample at the 0,0,0 coordinate)?

@starsdong
Copy link
Contributor Author

This is on my radar, but I haven't had chance to look deeper yet. I can share a few early comments. We don't have a convention for utility libraries in EICrecon. For now, do you think we could merge Helix.cc and Helix.h into SecondaryVerticesHelix.cc? I also see you provide Config structure, but don't expose the parameters in the factory. And last is the hardcoded b_field, would it make sense to get the value from the geometry service instead (e.g. sample at the 0,0,0 coordinate)?

I believe it is in principle possible to get merged into SecondaryVerticesHelix.cc. But the Helix.cc is pretty sizable, and I believe many functions can be used in other down stream analysis. The code is largely copied from STAR with adjustments to be adaptable to edm4eic constainers. I think it is probably preferrable to keep them separated so it is easier to maintain.

I wasn't sure that I understand completely about your comment "I also see you provide Config structure, but don't expose the parameters in the factory." Do you suggest to explicitly put them out in reco.cc when creating this factory? I see there, some factories do this way, some don't. I am fine with either requirement.

Regarding the b_field, Yes, I was thinking about the way you suggested too. Let me try to update this part soon. Thanks

@starsdong
Copy link
Contributor Author

I believe it is in principle possible to get merged into SecondaryVerticesHelix.cc. But the Helix.cc is pretty sizable, and I believe many functions can be used in other down stream analysis. The code is largely copied from STAR with adjustments to be adaptable to edm4eic constainers. I think it is probably preferrable to keep them separated so it is easier to maintain.

Maybe it's for the best to keep it separate, especially if we find that it has questions about authorship/license. But in principle, if left as is, we may have to relocate it at some point.

I wasn't sure that I understand completely about your comment "I also see you provide Config structure, but don't expose the parameters in the factory." Do you suggest to explicitly put them out in reco.cc when creating this factory? I see there, some factories do this way, some don't. I am fine with either requirement.

I did not mean this. See my inline comment above, I hope that will clarify.

Hi Dmitri,

The PR has been updated with new commits addressing the magnetic field input and the parameters declaration in Config file. Thanks

/xin

Copy link
Member

@veprbl veprbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, this is in good shape. Some last comments. Could you clarify on Wouter's question regarding the Helix code authorship.

@veprbl
Copy link
Member

veprbl commented Nov 13, 2025

Also, if I want to test this, which sample would you recommend? epic_craterlake/SIDIS/D0_ABCONV/pythia8.306-1.0/18x275/hiDiv? Is there a benchmark script that we can put in?

@starsdong
Copy link
Contributor Author

I think, this is in good shape. Some last comments. Could you clarify on Wouter's question regarding the Helix code authorship.

Yes, I am contacting STAR to clarify how to best address the authorship issue. Will follow up soon.

@starsdong
Copy link
Contributor Author

Also, if I want to test this, which sample would you recommend? epic_craterlake/SIDIS/D0_ABCONV/pythia8.306-1.0/18x275/hiDiv? Is there a benchmark script that we can put in?

I think this should be a good sample (or any DIS event sample). I am not familiar with the benchmark script. Maybe we can follow up along later to set it up.

Update license/copyright description
veprbl
veprbl previously approved these changes Nov 21, 2025
Copy link
Member

@veprbl veprbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears all comments are now addressed. I've tried to cross check this against the AMVF implementation, to make sure there are not a significant inconsistencies. Nothing was uncovered, so let's not delay this further.
I also commend authors for persevering and going above and beyond about presenting their work to the collaboration.

@veprbl
Copy link
Member

veprbl commented Nov 21, 2025

Since there was no benchmark provided, I vibe coded a simple analysis for myself. It looks like this code enables us to resolve kaon decays:
image

@veprbl veprbl enabled auto-merge November 25, 2025 14:35
@veprbl veprbl added this pull request to the merge queue Nov 26, 2025
Merged via the queue into main with commit 5c506e8 Nov 26, 2025
128 checks passed
@veprbl veprbl deleted the pr/secondaryvertex-helix branch November 26, 2025 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants